class ProgramInformationsController < ApplicationController
  def index
    @program_informations = ProgramInformation.all
  end

  def show
    @program_information = ProgramInformation.find(params[:id])
  end

  def new
    @program_information = ProgramInformation.new
  end

  def create
    @program_information = ProgramInformation.new(params[:program_information])
    if @program_information.save
      redirect_to @program_information, :notice => "Successfully created program information."
    else
      render :action => 'new'
    end
  end

  def edit
    @program_information = ProgramInformation.find(params[:id])
  end

  def update
    @program_information = ProgramInformation.find(params[:id])
    if @program_information.update_attributes(params[:program_information])
      redirect_to @program_information, :notice  => "Successfully updated program information."
    else
      render :action => 'edit'
    end
  end

  def destroy
    @program_information = ProgramInformation.find(params[:id])
    @program_information.destroy
    redirect_to program_informations_url, :notice => "Successfully destroyed program information."
  end
end
